<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>运营管理后台</title>
		<!-- CSS -->
		<link href="css/OpenSans.css" rel="stylesheet" type="text/css">
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link href="css/jasny-bootstrap.min.css" rel="stylesheet">
		<link href="css/font-awesome.css" rel="stylesheet" type="text/css">
		<link href="css/daterangepicker-bs3.css" rel="stylesheet" type="text/css">
		<link href="css/datepicker.css" rel="stylesheet" type="text/css">
		<link href="css/select2.css" rel="stylesheet" type="text/css">
		<link href="css/select2-bootstrap.css" rel="stylesheet" type="text/css">
		<link href="css/uniform.default.min.css" rel="stylesheet" type="text/css">
		<!-- easyui -->
		<link href="easyui/themes/insdep/easyui.css" type="text/css" rel="stylesheet">
	  	<link href="easyui/themes/insdep/easyui_animation.css" type="text/css" rel="stylesheet">
	  	<link href="easyui/themes/insdep/easyui_plus.css" type="text/css" rel="stylesheet">
	  	<link href="easyui/themes/insdep/insdep_theme_default.css" type="text/css" rel="stylesheet">
	  	<link href="easyui/themes/insdep/icon.css" type="text/css" rel="stylesheet">

		<!--<link href="scripts/css/prettify.css" rel="stylesheet" type="text/css" />
        <link href="http://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.10/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />-->
		<link href="css/fullcalendar.css" rel="stylesheet">
		<link href="css/fullcalendar.print.css" rel="stylesheet" media="print">
		<link href="css/toastr.min.css" rel="stylesheet">
		<link href="css/ark.css" rel="stylesheet" type="text/css">
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
            <script src="/manager/js/html5shiv.js"></script>
            <script src="/manager/js/respond.min.js"></script>
        <![endif]-->
		<script type="text/javascript" src="js/jquery.min.js"></script>
	  	<script type="text/javascript" src="easyui/script/jquery.easyui.min.js"></script>
	  	<script type="text/javascript" src="easyui/script/easyui-lang-zh_CN.js"></script>
	  	<script type="text/javascript" src="easyui/themes/insdep/jquery.insdep-extend.min.js"></script>
	</head>

	<body class="cover">
		<div class="wrapper">
			<!-- HEAD NAV -->
			<DIV class="navbar navbar-default navbar-static-top navbar-main" role="navigation">
				<DIV class="navbar-header">
					<A class="navbar-brand" href="#">
						运营管理后台</A>
				</DIV>
				<UL class="nav navbar-nav navbar-left">
					<LI class="sidemenu-switch">
						<A href="#">
							<SPAN class="sr-only">Toggle navigation</SPAN>
							<I class="fa fa-bars"></I>
						</A>
					</LI>
				</UL>
				<UL class="nav navbar-nav navbar-right">
					<LI class="visible-xs">
						<A class="navbar-toggle" href="#" data-toggle="collapse" data-target=".sidebar">
							<SPAN class="sr-only">Toggle 
  navigation</SPAN>
							<I class="fa fa-bars"></I> </A>
					</LI>
					<LI class="dropdown">
						<A class="dropdown-toggle avatar pull-right" href="#" data-toggle="dropdown">
							<SPAN class="hidden-small">管理员<B 
  class="caret"></B></SPAN> </A>
						<UL class="dropdown-menu pull-right">
							<LI>
								<A href="#">
									<I class="fa fa-sign-out"></I>退出登录</A>
							</LI>
						</UL>
					</LI>
				</UL>
			</DIV>
			<!-- END: HEAD NAV -->

			<!-- BODY -->
			<div class="body">
				<!-- SIDEBAR -->
				<!-- SIDEBAR -->
				<ASIDE class="sidebar">
					<UL class="nav nav-stacked">
						<LI class="menu">
							<A class="menu-toggle" href="#">
								<I class="fa fa-users fa-fw"></I>
								<SPAN class="item-label">玩家管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="user-list.html">
										<I class="fa fa-sort-alpha-asc fa-fw"></I>
										<SPAN>玩家列表</SPAN>
									</A>
								</LI>
								<LI>
									<A href="usergame-list.html">
										<I class="fa fa-list fa-fw"></I>
										<SPAN>玩家游戏统计</SPAN>
									</A>
								</LI>
								<LI>
									<A href="user-gold.html">
										<I class="fa fa-support fa-fw"></I>
										<SPAN>玩家资产</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu">
							<A class="menu-toggle" href="#">
								<I class="fa fa-puzzle-piece fa-fw"></I>
								<SPAN class="item-label">游戏管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="user-list.html">
										<I class="fa fa-cube fa-fw"></I>
										<SPAN>装备管理</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu">
							<A class="menu-toggle" href="#">
								<I class="fa fa-shopping-cart fa-fw"></I>
								<SPAN class="item-label">商品和订单<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="user-list.html">
										<I class="fa fa-suitcase fa-fw"></I>
										<SPAN>商品管理</SPAN>
									</A>
								</LI>
							
								<LI>
									<A href="user-list.html">
										<I class="fa fa-print fa-fw"></I>
										<SPAN>订单管理</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu">
							<A class="menu-toggle" href="#">
								<I class="fa fa-bitcoin fa-fw"></I>
								<SPAN class="item-label">挖矿和交易<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="user-list.html">
										<I class="fa fa-truck fa-fw"></I>
										<SPAN>挖矿记录</SPAN>
									</A>
								</LI>
							
								<LI>
									<A href="user-list.html">
										<I class="fa fa-sign-in fa-fw"></I>
										<SPAN>提取记录</SPAN>
									</A>
								</LI>
								<LI>
									<A href="user-list.html">
										<I class="fa fa-share-square-o fa-fw"></I>
										<SPAN>出售记录</SPAN>
									</A>
								</LI>
								<LI>
									<A href="user-list.html">
										<I class="fa fa-usd fa-fw"></I>
										<SPAN>交易记录</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
					
						
						<LI class="menu ">
							<A class="menu-toggle" href="#/user/users">
								<I class="fa fa-user fa-fw"></I>
								<SPAN class="item-label">系统用户<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="user-manage.html">
										<I class="fa fa-female fa-fw"></I>
										<SPAN>用户管理</SPAN>
									</A>
								</LI>
								<LI>
									<A href="#">
										<I class="fa fa-th-large fa-fw"></I>
										<SPAN>角色与权限</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/user/users">
								<I class="fa fa-phone fa-fw"></I>
								<SPAN class="item-label">客户服务<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#">
										<I class="fa fa-credit-card fa-fw"></I>
										<SPAN>会员反馈处理</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/user/users">
								<I class="fa fa-adn fa-fw"></I>
								<SPAN class="item-label">应用管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#/app/notices">
										<I class="fa fa-bullhorn fa-fw"></I>
										<SPAN>公告设置</SPAN>
									</A>
								</LI>
								<LI>
									<A href="#/app/apps">
										<I class="fa fa-android fa-fw"></I>
										<SPAN>版本管理</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/player/players#">
								<I class="fa fa-header fa-fw"></I>
								<SPAN class="item-label">活动管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#/activity/activities">
										<I class="fa fa-sort-alpha-asc fa-fw"></I>
										<SPAN>活动列表</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/player/players#">
								<I class="fa fa-bar-chart-o fa-fw"></I>
								<SPAN class="item-label">推广统计<I class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="richest-player.html">
										<I class="fa fa-users fa-fw"></I>
										<SPAN>玩家推广记录</SPAN>
									</A>
								</LI>
								
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/player/players#">
								<I class="fa fa-sliders fa-fw"></I>
								<SPAN class="item-label">系统管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#/system/logs">
										<I class="fa fa-history fa-fw"></I>
										<SPAN>系统日志</SPAN>
									</A>
								</LI>
								<LI>
									<A href="#/player/players#">
										<I class="fa fa-cloud fa-fw"></I>
										<SPAN>系统监控</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
					</UL>
				</ASIDE>
				<!-- END: SIDEBAR -->
				<!-- END: SIDEBAR -->
				<section class="content" style="min-height: 866px;">
					<ol class="breadcrumb">
						<li><i class="fa fa-support fa-fw"></i> 金币记录</li>
					</ol>
					<!-- CONTENT -->
					<div class="main-content">
						<ul class="nav nav-tabs" role="tablist">
							<li class="active">
								<a href="#player/gold/logs">所有区域</a>
							</li>
							<li>
								<a href="#player/gold/log/heishan">黑山</a>
							</li>
							<li>
								<a href="#player/gold/log/quyang">曲阳</a>
							</li>
						</ul><br>
						<div class="row">
							<div class="col-md-3 col-sm-3">
								<div class="form-group">
									<input type="number" min="1" name="saler" class="form-control" placeholder="销售ID">
								</div>
							</div>
							<div class="col-md-3 col-sm-3">
								<div class="form-group">
									<input type="number" min="1" name="agent" class="form-control" placeholder="代理ID">
								</div>
							</div>
							<div class="col-md-3 col-sm-3">
								<div class="form-group">
									<input type="number" min="1" name="id" class="form-control" placeholder="用户ID">
								</div>
							</div>
							<div class="col-md-3 col-sm-3">
							</div>
						</div>
						<div class="row">
							<div class="col-md-3 col-sm-3">
								<div class="form-group">
									<input class="form-control datepicker" name="start" type="text" data-date-format="yyyy-mm-dd" placeholder="起始时间">
								</div>
							</div>
							<div class="col-md-3 col-sm-3">
								<div class="form-group">
									<input class="form-control datepicker" name="end" type="text" data-date-format="yyyy-mm-dd" placeholder="结束时间">
								</div>
							</div>
							<div class="col-md-3 col-sm-3">
							</div>
							<div class="col-md-3 col-sm-3 text-right">
								<a href="javascript:goPage(1)" class="btn btn-primary">搜索</a>
							</div>
						</div>
						<ul class="nav nav-tabs no-border">
							<li class="active">
								<a href="#player/gold/logs">全部</a>
							</li>
							<li>
								<a href="#player/gold/logs/income">收入</a>
							</li>
							<li>
								<a href="#player/gold/logs/expenses">支出</a>
							</li>
						</ul>
						<div class="row">
							<div class="col-md-12" role="dataResult">
								<table class="table table-hover table-striped">
									<thead>
										<tr>
											<th>记录ID</th>
											<th>用户ID</th>
											<th>用户帐号</th>
											<th>区域</th>
											<th>昵称</th>
											<th>性别</th>
											<th>收／支</th>
											<th>原始数量</th>
											<th>变动数量</th>
											<th>备注</th>
											<th>操作人</th>
											<th>操作人类型</th>
											<th>时间</th>
										</tr>
									</thead>
									<tbody>

										<tr>
											<td>66</td>
											<td>1032</td>
											<td>108336</td>
											<td>曲阳</td>
											<td>皇甫稳赢</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-20 10:00:59</td>
										</tr>

										<tr>
											<td>65</td>
											<td>1031</td>
											<td>109096</td>
											<td>曲阳</td>
											<td>蘇夏</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-15 12:19:58</td>
										</tr>

										<tr>
											<td>64</td>
											<td>1030</td>
											<td>102057</td>
											<td>曲阳</td>
											<td>上官赌圣</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-14 16:31:46</td>
										</tr>

										<tr>
											<td>63</td>
											<td>1029</td>
											<td>102059</td>
											<td>曲阳</td>
											<td>夏侯不输</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-14 15:30:32</td>
										</tr>

										<tr>
											<td>62</td>
											<td>1028</td>
											<td>104224</td>
											<td>曲阳</td>
											<td>皇甫自摸</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-14 15:00:27</td>
										</tr>

										<tr>
											<td>61</td>
											<td>1027</td>
											<td>101583</td>
											<td>曲阳</td>
											<td>天马行空</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-12 22:22:52</td>
										</tr>

										<tr>
											<td>60</td>
											<td>1026</td>
											<td>104601</td>
											<td>曲阳</td>
											<td>王兴</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-12 17:10:48</td>
										</tr>

										<tr>
											<td>59</td>
											<td>1025</td>
											<td>104246</td>
											<td>曲阳</td>
											<td>王谦</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-12 17:10:06</td>
										</tr>

										<tr>
											<td>58</td>
											<td>1024</td>
											<td>109272</td>
											<td>曲阳</td>
											<td>东方自摸</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-12 15:06:46</td>
										</tr>

										<tr>
											<td>57</td>
											<td>1023</td>
											<td>101726</td>
											<td>曲阳</td>
											<td>刘海涛</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-12 14:06:21</td>
										</tr>

										<tr>
											<td>56</td>
											<td>1022</td>
											<td>108404</td>
											<td>曲阳</td>
											<td>L</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-11 14:02:39</td>
										</tr>

										<tr>
											<td>55</td>
											<td>1021</td>
											<td>104562</td>
											<td>黑山</td>
											<td>欧阳有钱</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-09 12:19:46</td>
										</tr>

										<tr>
											<td>54</td>
											<td>1020</td>
											<td>108524</td>
											<td>黑山</td>
											<td>轩辕雀圣</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-09 12:17:51</td>
										</tr>

										<tr>
											<td>53</td>
											<td>1019</td>
											<td>101907</td>
											<td>黑山</td>
											<td>子车赌侠</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-09 09:22:43</td>
										</tr>

										<tr>
											<td>52</td>
											<td>1018</td>
											<td>102796</td>
											<td>黑山</td>
											<td>东郭好运</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-08 18:11:23</td>
										</tr>

										<tr>
											<td>51</td>
											<td>1017</td>
											<td>106616</td>
											<td>曲阳</td>
											<td>上官稳赢</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-08 16:38:16</td>
										</tr>

										<tr>
											<td>50</td>
											<td>1016</td>
											<td>103227</td>
											<td>曲阳</td>
											<td>司马赌侠</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-08 15:06:30</td>
										</tr>

										<tr>
											<td>49</td>
											<td>1015</td>
											<td>102542</td>
											<td>曲阳</td>
											<td>独孤雀圣</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-08 14:47:34</td>
										</tr>

										<tr>
											<td>48</td>
											<td>1014</td>
											<td>108424</td>
											<td>曲阳</td>
											<td>轩辕不输</td>
											<td>男</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-07 18:06:30</td>
										</tr>

										<tr>
											<td>47</td>
											<td>1013</td>
											<td>109647</td>
											<td>曲阳</td>
											<td>东阳稳赢</td>
											<td>女</td>
											<td>收入</td>
											<td>0</td>
											<td>0</td>
											<td>注册赠送</td>
											<td>--</td>
											<td>系统</td>
											<td>2018-03-07 18:06:23</td>
										</tr>

									</tbody>
								</table>

								<input type="hidden" id="page" value="1">
								<ul class="pagination pagination-sm pull-left no-bottom-margin no-top-margin" role="pagination">

									<!--前-->

									<li class="disabled">
										<a href="#player/gold/logs#">«</a>
									</li>

									<!--中-->

									<li class="disabled">
										<a href="#player/gold/logs#">1</a>
									</li>

									<li data-page="2">
										<a>2</a>
									</li>

									<li data-page="3">
										<a>3</a>
									</li>

									<li data-page="4">
										<a>4</a>
									</li>

									<!--后-->

									<li data-page="4">
										<a title="末页">»</a>
									</li>

								</ul>

								<script type="text/javascript">
									$('ul[role=pagination] li').on('click', function() {
										var page = $(this).attr('data-page');
										if(page && !isNaN(parseInt(page))) {
											goPage(page);
										}
									});
								</script>

							</div>
							<div role="dataLoading" class="col-md-12 center-block text-center" style="display: none">
								<img src="css/loading.gif">
							</div>
						</div>
					</div>
					<!-- END: CONTENT -->
				</section>
			</div>
			<!-- END: BODY -->
		</div>
		<div class="modal fade" role="dialog" id="sureModal" style="z-index: 10000">
			<div class="modal-dialog modal-sm">
				<div class="modal-content">
					<div class="modal-header">
						<h4 class="modal-title">确认要进行此操作吗?</h4>
					</div>
					<div class="modal-footer no-border" data-role="footer">
						<button class="btn btn-default" data-dismiss="modal">取消</button>
						<button class="btn btn-success confirm">确定</button>
					</div>
					<div class="modal-footer no-border" data-role="loading" style="display: none;">
						<img src="css/loading.gif">
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			function _confirmModal(evn, title, notClose) {
				$('#sureModal').modal('show');
				$('#sureModal .btn-success').unbind('click');
				$('#sureModal .btn-success').on('click', function() {
					evn();
					if(!notClose) {
						$('#sureModal').modal('hide');
						$('.modal-backdrop').hide();
					}
				});
				if(title) {
					$('#sureModal .modal-title').html(title);
				} else {
					$('#sureModal .modal-title').html('确认要进行此操作吗？');
				}
			}
		</script>
		<!-- JS -->
		<script src="js/jquery-ui.min.js"></script>
		<script src="js/jquery.uniform.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script src="js/jasny-bootstrap.min.js"></script>
		<script src="js/jquery.autosize.min.js"></script>
		<script src="js/moment.min.js"></script>
		<script src="js/daterangepicker.js"></script>
		<script src="js/bootstrap-datepicker.js"></script>
		<script src="js/fullcalendar.min.js"></script>
		<!-- <script src="/manager/vendor/dropzone/dist/min/dropzone.min.js"></script> -->
		<script src="js/select2.min.js"></script>
		<script src="js/base.js"></script>
		<!-- <script src="/manager/js/ark.js"></script> -->
		<script src="js/toastr.min.js"></script>
		<script src="js/admin.js"></script>

		<script type="text/javascript">
			$(function() {
				initDatePickers();
			});
			/* 分页*/
			function goPage(number) {
				$('div[role=dataResult]').hide();
				$('div[role=dataLoading]').show();

				var saler = $('input[name=saler]').val();
				var agent = $('input[name=agent]').val();
				var id = $('input[name=id]').val();
				var start = $('input[name=start]').val();
				var end = $('input[name=end]').val();

				var url = '?page=' + number + '&radom=' + Date.now();
				if(saler && !isNaN(parseInt(saler))) {
					url += '&saler=' + saler;
				}
				if(agent && !isNaN(parseInt(agent))) {
					url += '&agent=' + agent;
				}
				if(id && !isNaN(parseInt(id))) {
					url += '&id=' + id;
				}
				if(start) {
					url += '&start=' + start;
				}
				if(end) {
					url += '&end=' + end;
				}

				$.ajax({
					url: url,
					type: 'get',
					success: function(result) {
						$('div[role=dataResult]').show();
						$('div[role=dataLoading]').hide();
						$('div[role=dataResult]').html(result)
						$("input:checkbox").uniform();
					}
				})
			}

			function initDatePickers() {
				$('.datepicker').datepicker({
					autoclose: true
				});
				$('#reportrange').daterangepicker({
						ranges: {
							'Today': [moment(), moment()],
							'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
							'Last 7 Days': [moment().subtract('days', 6), moment()],
							'Last 30 Days': [moment().subtract('days', 29), moment()],
							'This Month': [moment().startOf('month'), moment().endOf('month')],
							'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
						},
						startDate: moment().startOf('month'),
						endDate: moment().endOf('month')
					},
					function(start, end) {
						$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
					}
				);
			}
		</script>

	</body>

</html>